package com.wing.oauth2.feign;

import com.wing.common.utils.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用用户中心中的userdetail对象，用户oauth中的登录
 * 获取的用户与页面输入的密码 进行BCryptPasswordEncoder匹配
 *
 * @author
 */
@FeignClient(name = "${oauth2.appName}", fallback = Oauth2ClientFallback.class)
public interface Oauth2Client {


        @GetMapping(value = "/oauth2/admin/user/login")
        JsonResult login(
                @RequestParam("username")String username
                ,@RequestParam("password")String password
                ,@RequestParam("grant_type") String grant_type
                ,@RequestParam("client_id") String client_id
                ,@RequestParam("client_secret") String client_secret);

}


